function setLocalStorage(key, value) {
    if (value instanceof Array || value instanceof Object) {
        value = JSON.stringify(value);
    }
    localStorage.setItem(key, value);
}
function getLocalStorage(key) {
    var val = localStorage.getItem(key);
    var reg = /^[[{].*[\]}]$/
    if (reg.test(val)) {
        val = JSON.parse(val);
    }
    return val;
}
export {
    setLocalStorage,
    getLocalStorage
}